-
Notifications
You must be signed in to change notification settings - Fork 470
Make application default to uncurried at the lambda level. #6894
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make application default to uncurried at the lambda level. #6894
Conversation
3ac17cb
to
4ffa73a
Compare
4ffa73a
to
de4896a
Compare
@cknitt this is still ongoing, but asking a review to take a look if it's on the right track. |
de4896a
to
2c2c472
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skimmed through the diffs, and other than the getters and setters they look good to me! 👍
jscomp/test/gpr_3875_test.js
Outdated
result.contents = "Some x, f returns false"; | ||
} | ||
return; | ||
if (exit === 2) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting that this causes an if to be generated instead of a switch.
2c2c472
to
08b6806
Compare
08b6806
to
33798cc
Compare
33798cc
to
eb5e36a
Compare
The effect is that a bunch of applications are treated as curried applications.
eb5e36a
to
0f69786
Compare
jscomp/ml/typecore.ml
Outdated
@@ -2178,7 +2166,7 @@ and type_expect_ ?type_clash_context ?in_function ?(recarg=Rejected) env sexp ty | |||
| _ -> false in | |||
|
|||
if fully_applied && not is_primitive then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the if could actually be removed now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still have foo(x, ...)
for partial application.
Merging this into the parent PR. |
This is to restore lost optimisations in uncurried mode: #6879 so every runtime use of curry is gone.